<?php

namespace IMT\AccountBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class AccountFormType extends AbstractType
{
    
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('title')
            ->add('color', 'choice', array(
            	'choices' => array(
            		'fc-event-blue' => 'Bleu', 
            		'fc-event-green' => 'Vert',
            		'fc-event-azul' => 'Bleu clair',
            		'fc-event-red' => 'Rouge',
            		'fc-event-black' => 'Noir',
            		'fc-event-orange' => 'Orange'
            	)
            ))
            ->add('username', 'text', array('required'=> false))
        	->add('password', 'password', array('required'=> false))
         	->add('active', 'checkbox', array('required'=> false))
        ;
    }
    
    public function getDefaultOptions(array $options)
    {
    	return array(
    			'data_class' => 'IMT\AccountBundle\Entity\Account',
    	);
    }

    public function getName()
    {
        return 'account_form';
    }
}
